package com.base.commonlib.utils;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by Administrator on 2020/2/18.
 */

public class RecycleGridDivider extends RecyclerView.ItemDecoration {

    int left = 10;
    int top = 20;
    int right = 10;
    int bottom = 20;

    public RecycleGridDivider(int left, int top, int right, int bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }


    public RecycleGridDivider() {
    }

    @Override
    public void getItemOffsets(Rect outRect, View view,
                               RecyclerView parent, RecyclerView.State state) {
       // outRect.set(10,20,10,20);
        outRect.set(left,top,right,bottom);
    }
}